import { request } from '@/utils/request';
import { SystemMetrics } from '@/types/monitor';

export const getSystemMetrics = () => {
  return request<SystemMetrics>({
    url: '/api/monitor/metrics',
    method: 'GET'
  });
};

export const getOnlineUserCount = () => {
  return request<number>({
    url: '/api/monitor/online-users',
    method: 'GET'
  });
};

export const getSystemInfo = () => {
  return request<Record<string, string>>({
    url: '/api/monitor/system-info',
    method: 'GET'
  });
};

export const getRedisInfo = () => {
  return request<Record<string, any>>({
    url: '/api/monitor/redis-info',
    method: 'GET'
  });
};

export const getDatabaseInfo = () => {
  return request<Record<string, any>>({
    url: '/api/monitor/database-info',
    method: 'GET'
  });
}; 